package com.axjy.service.impl;

import com.axjy.dao.UserMapper;
import com.axjy.pojo.User;
import com.axjy.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by zjn on 2018/2/3.
 */
@Service("UserService")
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;

    @Override
    public List<User> list() {
        return userMapper.list();
    }

    @Override
    public User check(String name, String password) {
        return userMapper.check(name,password);
    }

    @Override
    public void grant(Integer roleId, Integer id) {
        userMapper.update(roleId,id);
    }


}
